import instance from '@/utils/http'
/**
 * 获取商品分页
 * @param data 
 */
export const goodsPage = (data: any) => instance.post('/sale/client/goods/page', data)
/**
 *  获取商品类型list
 */
export const getGoodTypeList = (pid:String) => instance.get('/sale/client/goods/type/list', { pid: pid })
/**
 *  获取购物车
 */
export const getshopCartList = () => instance.get('/sale/client/shop/cart/list')
/**
 *  添加购物车
 */
export const addShopCart = (data:any) => instance.post('/sale/client/shop/cart/add', data)
/**
 *  添加购物车
 */
export const deletShopCart = (ids:Array<any>) => instance.delete('/sale/client/shop/cart/delete', ids)
/**
 * 获取购物车类型
 */
export const getSpecListBySpecId=(id:String)=>instance.get('/sale/client/goods/spec/getListByTypeId/'+id)
/**
 * 获取购物车类型
 */
export const getSpecDetailByPid=(id:String)=>instance.get('/sale/client/goods/spec/getSpecDetailByPid/'+id)